package com.cjy.discuss.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.io.Serializable;


@Data
@AllArgsConstructor
@NoArgsConstructor
@Document(collection = "comment")
public class Comment implements Serializable {
      @Id
      private String id;
      private String articleid;
      @Field("content")
      private String content;
      @Indexed
      private Integer userid;
      private String nickname;
      private String createdatetime;
      private Integer likenum;
      private Integer replynum;
      private String state;
      private String parentid;



}
